package com.william.jdbcplus.boot.test.util;

import com.william.jdbcplus.boot.test.constant.GlobalConst;
import com.william.jdbcplus.core.dialect.ddl.DDLUtil;

import javax.sql.DataSource;

/**
 * 根据实体创建表，表不存在时建表
 */
public class CreateTablesUtil {
    public static void main(String[] args) {
        DataSource mysqlDatasource = DsUtil.getMysql();
        DataSource oracleDatasource = DsUtil.getOracle();
        DataSource sqlServerDatasource = DsUtil.getSqlServer();
        DDLUtil.createDatabaseTables(GlobalConst.scanPackage, mysqlDatasource);
        DDLUtil.createDatabaseTables(GlobalConst.scanPackage, oracleDatasource);
        DDLUtil.createDatabaseTables(GlobalConst.scanPackage, sqlServerDatasource);
    }
}
